<?php
declare (strict_types = 1);

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class CarBindStore extends Model
{
    //
    /**
     * 根据商户id获取用户信息
     * @param $manager_id
     * @return array|bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function getUserToManagerId($manager_id){
        $data = self::where(['manager_id'=>$manager_id])->select();
        if(!empty($data)){
            $data = $data->toArray();
            $list = array_unique(array_column($data,'user_id'));
            return $list;
        }
        return $data;
    }
}
